From 0d48c1d1a30f4af5a696fe19029ecde1e9e9bf34 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Mon, 13 Nov 2006 14:11:08 +0000 Subject: [PATCH] [XEN] x86-64: don't compile some unused MTRR code Signed-off-by: Jan Beulich --- xen/arch/x86/cpu/mtrr/Makefile | 6 +++--- xen/arch/x86/cpu/mtrr/main.c | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/cpu/mtrr/Makefile b/xen/arch/x86/cpu/mtrr/Makefile index 445138aa3c..213a7787af 100644 --- a/xen/arch/x86/cpu/mtrr/Makefile +++ b/xen/arch/x86/cpu/mtrr/Makefile @@ -1,6 +1,6 @@ -obj-y += amd.o -obj-y += centaur.o -obj-y += cyrix.o +obj-$(x86_32) += amd.o +obj-$(x86_32) += centaur.o +obj-$(x86_32) += cyrix.o obj-y += generic.o obj-y += main.o obj-y += state.o diff --git a/xen/arch/x86/cpu/mtrr/main.c b/xen/arch/x86/cpu/mtrr/main.c index 5684d40c89..72cab7be1b 100644 --- a/xen/arch/x86/cpu/mtrr/main.c +++ b/xen/arch/x86/cpu/mtrr/main.c @@ -64,7 +64,11 @@ struct mtrr_ops * mtrr_if = NULL; static void set_mtrr(unsigned int reg, unsigned long base, unsigned long size, mtrr_type type); +#ifndef CONFIG_X86_64 extern int arr3_protected; +#else +#define arr3_protected 0 +#endif static char *mtrr_strings[MTRR_NUM_TYPES] = { @@ -539,9 +543,11 @@ extern void centaur_init_mtrr(void); static void __init init_ifs(void) { +#ifndef CONFIG_X86_64 amd_init_mtrr(); cyrix_init_mtrr(); centaur_init_mtrr(); +#endif } /* The suspend/resume methods are only for CPU without MTRR. CPU using generic @@ -593,6 +599,7 @@ void __init mtrr_bp_init(void) size_and_mask = 0; } } else { +#ifndef CONFIG_X86_64 switch (boot_cpu_data.x86_vendor) { case X86_VENDOR_AMD: if (cpu_has_k6_mtrr) { @@ -619,6 +626,7 @@ void __init mtrr_bp_init(void) default: break; } +#endif } if (mtrr_if) { -- 2.30.2